<?php
/**
 * Created by linzhonghuang.
 * Github: git@github.com:lichtung/Sharina.git
 * Email: 784855684@qq.com
 * Date: 2016/12/11
 * Time: 16:27
 */

namespace application\module\explorer\libs;


use wshore\core\Storage;
use wshore\helper\traits\Singleton;

class Groups extends FileCache
{
    use Singleton;

    function __construct()
    {
        $file = WS_PATH_DATA . '/explorer/group.php';
        if (!is_file($file)) {
            Storage::write($file, '<?php exit;?>{"root":{"role":"root","name":"Administrator","path":"","ext_not_allow":""},"default":{"role":"default","name":"default","ext_not_allow":"php|asp|jsp","explorer:mkdir":1,"explorer:mkfile":1,"explorer:pathRname":1,"explorer:pathDelete":1,"explorer:zip":1,"explorer:unzip":1,"explorer:pathCopy":1,"explorer:pathCute":1,"explorer:pathCuteDrag":1,"explorer:clipboard":1,"explorer:pathPast":1,"explorer:pathInfo":1,"explorer:pathInfoMuti":1,"explorer:serverDownload":1,"explorer:fileUpload":1,"explorer:search":1,"app:user_app":1,"editor:fileSave":1},"guest":{"role":"guest","name":"guest","ext_not_allow":"php|asp|jsp"}}');
        }
        parent::__construct($file);
    }
}